ChangeTextToUnicodeInfo
Changes the mapping information for the specified Unicode converter object used to convert text to Unicode to the new mapping you provide.
pascal OSStatus ChangeTextToUnicodeInfo ( TextToUnicodeInfo ioTextToUnicodeInfo, ConstUnicodeMappingPtr iUnicodeMapping);
ioTextToUnicodeInfo
- The Unicode converter object of type
TextToUnicodeInfo
(page 119) containing the mapping to be modified. You use the functionCreateTextToUnicodeInfo
(page 125) to obtain one.iUnicodeMapping
- A structure of type
UnicodeMapping
(page 118) identifying the new mapping to be used. This is the mapping that replaces the existing mapping in the Unicode converter object.- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) in the chapter "Basic Text Types Reference."
DISCUSSION
TheChangeTextToUnicodeInfo
function allows you to provide new mapping information for text to be converted to Unicode. The function replaces the mapping table information that currently exists in the Unicode converter object pointed to by theioTextToUnicodeInfo
parameter with the information contained in theUnicodeMapping
structure you supply as theiUnicodeMapping
parameter.
ChangeTextToUnicodeInfo
resets the Unicode converter object's fields as necessary.In addition to various resource errors, the function can return the following result codes:
If an error is returned, the Unicode converter object is invalid.
paramErr
The Unicode converter object you supplied is invalid.kTextUnsupportedEncodingErr
One of the encodings specified by the Unicode mapping structure you supplied is not currently supported.kTECMissingTableErr
A resource associated with one of the encodings is missing.kTECTableChecksumErr
A resource has an invalid checksum, indicating that it has become corrupted.